Scripting Codes 1 through 29 The following codes are used when scripting Action Points. There are many codes, many with a number of options. This allows you to create unique events in an infinite number of possibilities. If you put the correct codes in sequence there is very little you can't do. Code 1 Display String ID String Number to Display Use: Display’s string and waits for player to click mouse. Options: Negative ID will cause string to be displayed without requiring player to click the mouse to continue. This is commonly done to display a string just prior to executing a Code 3 in order to ask the player a question. E-Codes: None   Code 2 Battle ID Extra Codes ID Use: Send party to combat. Options: None E-Codes: 1) Battle Number: Low Battle Number for Range Battle 2) High Battle Number for Range Battle 3) Sound to play before battle. (Optional) X-AP on Revived Losses. 4) String to display before battle. (Optional) 5) Treasure award status / Party revive status. 1) If you want the player to do battle with a specific battle number, input the battle number desired in #1 and leave #2 blank. If you want them to enter a random battle between a range of battles, enter the low battle range in #1 and the high range in #2. Negative battle numbers will cause the party to be surprised by the opposing force. This allows all enemies to move before party members. Example: A low battle range of -4 and a high battle range of -8 would give them a random battle between 4 and 8 and always be surprised. 2) If you want to have the player enter combat in a random battle, enter the low range of battles in #1 and the high range of battles in #2. 3) Sound to be played as the player enters combat, enter the sound ID here. This is optional and is not required. 4) String to be displayed before the player enters combat, enter the string ID here. This is optional and is not required. 5) A value of 0 (Zero) here will award all items from enemies along with full Victory Points to the party when combat is over. A value of 5 here will cause the player to receive Victory Points only. ---------------------------------------------------------------- A value of 10 here will cause the party to be revived if they loose this battle. They will all come back with 1 point of stamina. They will not be awarded any victory points or treasure for this lost battle. If you use the revive option then specify an X-AP to branch to in item 3. DO NOT specify an optionl sound in battles you use the revive option on.   Code 3 Player Option ID Extra Codes ID Use: Allows you to ask the player either a YES/NO question or you can prompt the player with anything you like and branch accordingly. Options: None E-Codes: 1) 1 = Yes: Continue 0 = No: Continue 2) 0 = Back Up, 1 = X-AP, 2 = Within Simple, 3 = Within Complex, 4 = Eliminate 3) X-AP/Branch No. Of Encounter (0-3) 4) Prompt, left side (Optional) 5) Prompt, right side (Optional) 1) A value of 1 here will cause the game to continue executing codes if the player clicks the YES or the Left option. Otherwise, the game will branch to the locations specified in #2 and #3. A value of 0 will cause the game to continue executing codes if the player clicks the NO or the Right option. Otherwise the game will branch to the locations specified in #2 and #3. 2) A value of 0 will cause the party to back up a pace on the map. A value of 1 will cause the game to branch to an Extra Action Point. A value of 2 will cause the game to branch Within a Simple Encounter. A value of 3 will cause the game to branch to Within a Complex Encounter. A value of 4 will cause the game to eliminate this Action Point and stop executing the script. 3) The Extra Action Point, or encounter result no. to branch to. You can either have it branch to an X-AP or have it branch within a simple or complex encounter. 4) A value of 0 will cause the game to display the standard YES / NO options for the user. A value greater than zero will cause the game to display a phrase. Example: String ID. 20 could be written to say, “Rescue the woman” String ID. 21 could be written to say, “Back away” A prompt, Left side value of 20 and a prompt, Right side value of 21 would cause the game to display the options as read above instead of the Yes/No.     5) Same as 4 above only for the right side of the question bar.   Code 4 Simple Encounter ID Simple Encounter ID Use: Send party to a Simple Encounter. Options: None E-Codes: None   Code 5 Complex Encounter ID Complex Encounter ID Use: Send party to a Complex Encounter. Options: None E-Codes: None   Code 6 Load shop (See code 73 for more options) ID Shop ID Use: Allow the party to use a shop/storage facility. Options: A negative Shop ID will send the party directly to the shop. If you give it a positive Shop ID it will activate the SHOP button. Example: A shop ID of -5 will send them to Shop 5 directly without having to click the SHOP button to enter the shop. E-Codes: None Script Tip: If you edit the shop to have an inflation rate of 0%, the shop will act as a storage facility. It will allow the party to store any item there and to later retrieve the items without cost. The party cannot store items that have a magical charge as the game normally recharges any items sold to a shop. To prevent FREE recharging, no chargeable items can be stored in a storage facility. Note: See code 72 for more options   Code 7 Change Action Point Codes ID Extra Codes ID Use: Allows you to change the codes for an Action Point anywhere in the scenario. Options: None E-Codes: 1) Land ID of Action Point codes to change. -2 = Replace Simple Encounter Script, -3 = Replace Complex Encounter Script 2) AP / Simple Enc ID / Complex Enc ID To Modify 3) Extra Action Point ID that contains the new codes 4) For AP replacement: 0 = Default to same land type, 1= Land Level, 2 = Dungeon Level 5) For Encounter Script Replacement: Result Code to Replace (0-3) Script Tip: In effect, this allows you to replace the codes for any Action Point, Extra Action Point, Encounter Result Script with a different set of codes you have stored as an Extra Action Point. For replacement of standard action points, all other aspects of the Action Point such as the percent chance and the location it will move the party to remains unchanged.   Code 8 Same as Other Action Point ID Extra Codes ID Use: This will allow you to assign codes to an Action Point by telling Realmz to use the same codes as another Action Point. Options: None E-Codes: 1) Land ID of which Action Point codes you want to use. 2) Action Point No. to use. Script Tip: This is more useful if you have many Action Points that all do the same thing but don't feel like coding them all. This way you can change the way they all behave by just changing the script of the one Action Point they all refer to.   Code 9 Play Sound ID Sound ID of sound you wish to play. Use: Allows you to play a sound. Options: A negative value for a sound ID will pause the execution of codes until the sound has finished playing. E-Codes: None Script Tip: To keep several sounds from running together you need to put in the ID as a negative. That way you can play several sounds end to end. Otherwise they will all play at the same time.   Code 10 Give Treasure ID Treasure ID Use: Allows you to give treasure to the party. The treasure will allow you to give gold, gems, jewelry, Victory Points and up to 20 items to the party. The amount of gold, gems, jewelry and Victory Points is subject to change according to the difficulty level the player chooses. Options: None E-Codes: None   Code 11 Give Victory Points ID Amount of Victory Points to give. Use: Allows you to give Victory Points to the party as a whole. All party members that are conscious and not animated will share in an equal portion of the Victory Points. This amount is subject to change according to the difficulty level the player chooses. Options: None E-Codes: None   Code 12 Change Land Tile ID Extra Codes ID Use: Allows you to change one land icon to that of another. Options: None E-Codes: 1) Land/Dungeon level of tile to change 2) X-Coordinate 3) Y-Coordinate 4) New Tile ID 5) 0 = Land Level, 1 = Dungeons   Code 13 Enable Action Point ID Extra Codes ID Use: Use this to enable or disable an Action Point or to alter the percent chance that the party will encounter it. Options: None E-Codes: 1) Land/Dungeon Level 2) Action Point Number 3) New % (Negative value = Disabled) 4) Action Point No. Low (Negative = Dungeon, Positive = Land) 5) Action Point No. High (Negative = Dungeon, Positive = Land)   Code 14 Pick Characters ID Number of characters to pick Use: This will allow you to select characters then have specific actions that will affect only those who have been picked. Options: A negative value for ID will allow the player to only pick those PCs who are currently conscious or animated. E-Codes: None   Code 15 Heal/Hurt Picked ID Extra Codes ID Use: Allows you to either heal or damage only those members who have been picked using a Code 14 or 30. (See Codes 14 and 30) The formula for calculating damage/healing is Multiplier X (random amount from low-high). Options: None E-Codes: 1) Multiplier ( - Is Hurt ) 2) Low Range 3) High Range 4) Sound ---Optional--- 5) Message ---Optional---   Code 16 Heal/Hurt Party ID Extra Codes ID Use: This will allow you to either heal or damage all party members. The formula for calculating damage/healing is: Multiplier X (random amount from low-high). Options: None E-Codes: 1) Multiplier ( - Is Hurt ) 2) Low Range 3) High Range 4) Sound ---Optional--- 5) Message ---Optional---   Code 17 Cast Spell on Picked ID Extra Codes ID Use: This will allow you to cast a spell on those who have been picked using a Code 14 or 30. (See Code 14 Above and 30 below) Options: None E-Codes: 1) Spell No. to Cast 2) Power Level 3) +/- % To DRVs Modifier 4) 1 = No chance for PCs to DRVs.   Code 18 Cast Spell on Party ID Extra Codes ID Use: This will allow you to cast a spell at all members of the party. Options: None E-Codes: 1) Spell No. to Cast 2) Power Level 3) +/- % To DRVs Modifier 4) 1 = No chance for PCs to DRVs.   Code 19 Display Random String ID Extra Codes ID Use: Allows you to display random strings in a range of strings. Options: None E-Codes: 1) Low String Range Number 2) High String Range Number   Code 20 Teleport ID Extra Codes ID Use: Allows you to move the party to a new land level and X: Y: position. If you teleport the party, with this code, onto a location that contains another Action Point, the new Action Point codes will begin to execute. To teleport a party onto another location that contains an Action Point without those codes from being executed, use code 45. Options: None E-Codes: 1) Land ID to Teleport To (-1 = No Change) 2) X-Coordinate (-1 = No Change) 3) Y-Coordinate (-1 = No Change) 4) Sound ---Optional--- 5) Message ---Optional--- Script Tip : At first glance this code may seem of no use. Why not just use the Goto Level of an Action Point to move the party? Well, it's simple. You can use this in the scripts of Extra Action Points and Encounters as well. That's why, my man. Note: A value of -1 in E-Code 1, 2 or 3 will tell the game NOT to make any change. It will remain the current value in the game. Example: If you set E-Code to -1 and the party is on level 4 they will move to the new X: Y: position on Level 4.   Code 21 Branch on Possession of Specific Item ID Extra Codes ID Use: Allows you to branch depending on whether or not someone in the party is in possession of a specific item. CODE 38 is similar to this code, except it will allow you to branch around within a simple or Complex Encounter only. Options: None E-Codes: 1) Item ID To Check For 2) If Possessed, Branch To: 0 = X-AP, 1 = Simple Encounter, 2 = Complex Encounter 3) If Not Possessed, 0 = Branch as by Item 5, 1 = Continue Codes 2 = String & Exit 4) X-AP / Encounter No. If Possessed. 5) X-AP / Encounter No. / String ID If Not Possessed.   Code 22 Alter Item Status ID Extra Codes ID Use: Allows you to change something about an item possessed by anyone in the party. Options: None E-Codes: 1) Item ID To Alter 2) Number of Items to Affect. 3) To Do: 1 = Drop, 2 = Charge, 3 = Change Item to Item ID 4) Charges To Add (- = Drain Charges) 5) New Item ID   Code 23 Alter Random Rectangle Information of a Land Level ID Extra Codes ID Use: Allows you to alter some aspects of a Random Rectangle. Code 92 also allows you to alter some aspects of a Random Rectangle. Options: Code -23 works in an identical fashion as Code 23 only it will alter Random Rectangle information for a Dungeon Level. E-Codes: 1) Land Level ID 2) Rectangle Number To Alter 3) New Times in 10,000 (0 = No Encounters, -1 = Use Invisible Encountner) 4) New Battle Range Low (-1 = No Change) 5) New Battle Range High (-1 = No Change)   Code -23 Alter Random Rectangle Information for a Dungeon Level ID Extra Codes ID Use: Allows you to alter some aspects of a Random Rectangle. Code 92 also allows you to alter some aspects of a Random Rectangle. Options: Code -23 works in an identical fashion as Code 23 only it will alter Random Rectangle information for Dungeon Level instead of a Land Level. E-Codes: 1) Land Level ID 2) Rectangle Number To Alter 3) New Times in 10,000 (0 = No Encounters, -1 = Use Invisible Encountner) 4) New Battle Range Low (-1 = No Change) 5) New Battle Range High (-1 = No Change)   Code 24 Exit Action Point And Keep Codes ID None Use: Allows you to exit the current Action Point and to have the codes saved. If the party walks on the same spot, the codes will begin all over again. Options: None E-Codes: None Script Tip: Code 24 is very common as the last code in an Action Point script. If you wish a specific Action Point to stick around for the entire game, then you need to put a 24 as the last code. This will cause it to be activated each and every time the party walks onto the Action point.   Code 25 Exit and Erase Action Point ID None Use: Allows you to exit the current Action Point and to have the Action Points codes erased. If the party walks on the same spot, nothing will happen. This is the default action if the end of the codes have been reached and a CODE 24 has not been encountered. Options: None E-Codes: None   Code 26 Get Click ID None Use: This will put up a small window that requires the player to click the mouse to continue. This code is somewhat obsolete now but I left it in so it would be backward compatible with some old scenario code. It does have a use every now and then. Options: None E-Codes: None   Code 27 Display Picture ID Picture Resource ID to display Use: Allows you to display a picture centered in the small tactical window. The picture must have a unique ID and must be in the "Scenario" resource. To add a pictures to your scenario you use the Picture Editor. You can access the Picture Editor via a button in the "Scenario Data" dialog. For more information on the Picture Editor see the chapter "Adding Pictures To Your Scenario" Options: None E-Codes: None   Code 28 Redraw Screen ID None Use: Redraws the screen. The only really great use for this is to draw the game screen after you have displayed a picture. Options: None E-Codes: None   Code 29 Give / Display Map ID Map Number to give or display. Use: Allows you to give the player any map from number 0 through 19. Map No. 0 is automatically given to the player as they begin an adventure. Options: Using a negative Map ID will display the map right away. Example: Lets say you want the part to view a map as soon as they walk on an AP. Lets say this is Map No. 5. A script of "Code 29 ID -5" will give the party map 5 and display it right away. E-Codes: None